home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 007 / jovept2.arc / TEMP.H < prev    next >
Text File  |  1985-05-30  |  2KB  |  88 lines

  1. /* temp.h */
  2.  
  3. /*
  4.  * The editor uses a temporary file for files being edited, in a structure
  5.  * similar to that of ed.
  6.  * Lines are represented in core by a pointer into the temporary file which
  7.  * is packed into 16 bits.  15 of these bits index the temporary file,
  8.  * the 16'th is used by by redisplay.  The parameters below control
  9.  * how much the 15 bits are shifted left before they index the temp file.
  10.  * Larger shifts give more slop in the temp file but allow larger files
  11.  * to be edited.
  12.  */
  13.  
  14. #ifndef VMUNIX
  15. #ifndef BIGTMP        /* 256k in tmp file */
  16.  
  17. #define    BLKMSK    0777
  18. #define    BNDRY    8
  19. #define    INCRMT    0200
  20. #define    LBTMSK    0770
  21. #define    NMBLKS    506
  22. #define    OFFBTS    7
  23. #define    OFFMSK    0177
  24. #define    SHFT    2
  25.  
  26. #else        /* 512 K in temp file with more slop, but it's worth it */
  27.  
  28. #define    BLKMSK    01777
  29. #define    BNDRY    16
  30. #define    INCRMT    0100
  31. #define    LBTMSK    0760
  32. #define    NMBLKS    1018
  33. #define    OFFBTS    6
  34. #define    OFFMSK    077
  35. #define    SHFT    3
  36.  
  37. #endif
  38.  
  39. #else
  40. #define    BLKMSK    077777
  41. #define    BNDRY    2
  42. #define    INCRMT    02000
  43. #define    LBTMSK    01776
  44. #define    NMBLKS    077770
  45. #define    OFFBTS    10
  46. #define    OFFMSK    01777
  47. #define    SHFT    0
  48. #endif
  49.  
  50. #ifdef JOVETEMP
  51. char    ibuff1[BUFSIZ],    /* Holds block `iblock1' of the tmp file */
  52.     ibuff2[BUFSIZ],    /*   "     "   `iblock2' of the tmp file */
  53.     obuff[BUFSIZ];    /* Holds the last block of the tmp file */
  54. int    ichng1,        /* ibuff1 should be written to its
  55.              * blocks when it is used to read
  56.              * another block.
  57.              */
  58.     ichng2,        /* "" */
  59.     iblock1,    /* Block number of ibuff1 */
  60.     iblock2,    /*           ibuff2 */
  61.     oblock,        /*            obuff  */
  62.     nleft,        /* Number of good characters left in current block */
  63.     hitin2,        /* Last read was in ibuff2 */
  64.     tmpfd;
  65. disk_line    tline;        /* Pointer to end of tmp file */
  66.  
  67. char    *tfname;
  68. #else
  69. extern char    ibuff1[BUFSIZ],    /* Holds block `iblock1' of the tmp file */
  70.     ibuff2[BUFSIZ],    /*   "     "   `iblock2' of the tmp file */
  71.     obuff[BUFSIZ];    /* Holds the last block of the tmp file */
  72. extern int    ichng1,        /* ibuff1 should be written to its
  73.              * blocks when it is used to read
  74.              * another block.
  75.              */
  76.     ichng2,        /* "" */
  77.     iblock1,    /* Block number of ibuff1 */
  78.     iblock2,    /*           ibuff2 */
  79.     oblock,        /*            obuff  */
  80.     nleft,        /* Number of good characters left in current block */
  81.     hitin2,        /* Last read was in ibuff2 */
  82.     tmpfd;
  83. extern disk_line    tline;        /* Pointer to end of tmp file */
  84.  
  85. extern char    *tfname;
  86. #endif
  87.  
  88.